package com.example.shoppingdemo;

import com.example.shoppingdemo.Center.CenterProduct;
import com.example.shoppingdemo.goods.Bean.Addbuycar;
import com.example.shoppingdemo.goods.Bean.CommodityBeanOne;
import com.example.shoppingdemo.nslcommodity.closebean.CloseResult;
import com.example.shoppingdemo.nslcommodity.conbean.ComResult;
import com.example.shoppingdemo.nslcommodity.estbean.EstResult;
import com.example.shoppingdemo.nslcommodity.invbean.InvResult;
import com.example.shoppingdemo.nslcommodity.javabean.CommodityResult;
import com.example.shoppingdemo.nslcommodity.orderbean.OrderResult;
import com.example.shoppingdemo.nslcommodity.paybean.PayResult;
import com.example.shoppingdemo.nslcommodity.recbean.RecResult;
import com.example.shoppingdemo.nslcommodity.returnsbean.DemoResult;
import com.example.shoppingdemo.nslcommodity.returnsbean.ReturnsResult;
import com.example.shoppingdemo.nslcommodity.shopbean.ShopResult;


import okhttp3.FormBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Path;
import retrofit2.http.Query;
import rx.Observable;
public interface ShoppingRequest {
    //全部订单
    @GET("/api/v1/orders/getorderAndItemById/{memberId}")
    Observable<CommodityResult> onCommodityResult(@Query("memberId")int id);

     //待付款订单
    @GET("/api/v1/orders/getorderAndItemById/{memberId}?status=0")
    Observable<PayResult> onPaylistResult(@Query("memberId") int memberId);

    //待发货订单
    @GET("/api/v1/orders/getorderAndItemById/{memberId}?status=1")
    Observable<ComResult> onComlistResult(@Query("memberId") int memberId);

    //已发货订单
    @GET("/api/v1/orders/getorderAndItemById/{memberId}?status=2")
    Observable<RecResult> onReclistResult(@Query("memberId") int memberId);

    //已完成订单
    @GET("/api/v1/orders/getorderAndItemById/{memberId}?status=3")
    Observable<EstResult> onEstlistResult(@Query("memberId") int memberId);

    //已关闭订单
    @GET("/api/v1/orders/getorderAndItemById/{memberId}?status=4")
    Observable<CloseResult> onCloselistResult(@Query("memberId") int memberId);

    //无效订单
    @GET("/api/v1/orders/getorderAndItemById/{memberId}?status=5")
    Observable<InvResult> onInvlistResult(@Query("memberId")int memberId);

    //订单详情
    @GET("/api/v1/orders/{orderId}")
    Observable<OrderResult> onOrderlistResult(@Path("orderId") int orderId);

    //商品列表
    @GET("/api/v1/product/findproduct")
    Observable<ShopResult> onShoppinglistResult();

    //退货列表
    @GET("/api/v1/orders/returnApply")
    Observable<ReturnsResult> onReturnslistResult();

    //退货详情
    @GET("/api/v1/orders/returnApply/{id}")
    Observable<DemoResult> onDemolistResult(@Path("id") int id);

    /**
     * 分类
     * @return
     */
    @POST("/api/v1/product/category/findPmsProductCategoryBYLever")
    Observable<CenterProduct> requestProductClass();

    //商品详情
    @GET("/api/v1/product/getProductApp/{id}")
    Observable<CommodityBeanOne> requestFindKuoZhanList(@Path("id") int id);

    //添加商品到购物车
    @POST("/api/v1/cartItem/addCartItem")
    Observable<Addbuycar> requestAddList(@Body FormBody body);
}
